<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html"/}
</head>

<body>
    
    <table id="teacher_routine_querydg">
        <thead>
            <tr>
                <th data-options="field:'ID',checkbox:true">ID</th>
                <th data-options="field:'学期ID',title:'学期名称',formatter:function(value,row,index){
                    return row.学期名称;
                }"></th>
                <th data-options="field:'评价部门',title:'评价部门'"></th>
                <th data-options="field:'评价类别',title:'评价类别'"></th>
                <th data-options="field:'评价日期',title:'评价日期'"></th>
                <th data-options="field:'教师ID',title:'教师',formatter:function(value,row,index){
                    return row.姓名;
                }"></th>
                <th data-options="field:'评价内容',title:'评价内容',width:200"></th>
                <th data-options="field:'加减分',title:'加减分'"></th>
            </tr>
        </thead>
    </table>
    <div id="teacher_routine_querytb">
        <form id="teacher_routine_queryForm" class="m5">
            <div>
                学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期：
                <select class="form-control1" name="termId" id="termId"></select>
                年级：
                <select class="form-control1" name="grade" id="grade"></select>
                学科：
                <select class="form-control1" name="subjectId" id="subjectId"></select>
                评价部门：
                <select class="easyui-combobox" name="depart" id="depart" data-options="width:70,panelHeight:'auto',editable:false,url: '{:url(\'teacherRoutineConf/departList\')}',onSelect:commentType"></select>
                评价类别：
                <select class="form-control1" name="commentType" id="commentType"></select>
                教师姓名：
                <input class="form-control1" name="teacherName" id="teacherName">
            </div>
            <div class="mt10">
                评价日期：
                <input class="easyui-datebox form-control1" name="startDate" id="startDate"> - <input class="easyui-datebox form-control1" name="endDate" id="endDate">
                <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('teacher_routine_query')">查询</a>
                <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm1('teacher_routine_query')">重置</a><br/>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        $(function(){
            var url = "/teacherRoutine/teacher_routine_query";
            initDatagrid("teacher_routine_query",url);
            termList("teacher_routine_query");
            initGrade("teacher_routine_query")
            initSubject("teacher_routine_query");
        })  
        function commentType(record) {
            $.ajax({
                url: "teacherRoutine/teacher_routine_conf/commentTypeList?depart=" + record.value,
                type: 'GET'
            }).done(function(data) {
                var html = "<option value=''>请选择</option>";
                for(var i in data) {
                    html += "<option value='"+data[i].value+"'>"+data[i].text+"</option>"
                }
                $("#teacher_routine_queryForm #commentType").html(html);
            })
        }
        function resetForm1(cf){
            $("#" + cf + "Form")[0].reset();
            $("#" + cf + "Form #depart").combobox('setValue', null);
            $("#" + cf + "Form #startDate").datebox('setValue', null);
            $("#" + cf + "Form #endDate").datebox('setValue', null);
        }
    </script>
</body>
</html>